module.exports = {
    telemetry:false,
    // apiAuthorization:"79614ed3-3fc4-4489-849f-aa1af628b0ca",
    apiAuthorization:"a7ff3537-feb9-455f-bf9a-9d9891dbab14",
    UID:"1",
    lang:"cn",
    // elasticsearchHost:"http://182.160.26.88:9200",
    elasticsearchHost:"http://127.0.0.1:9200",
    ssr: true,
    transition: 'none',
    target: 'server',
    components: true,
    /*
   ** Headers of the page
   ** See https://nuxtjs.org/api/configuration-head
   */
  head: {
    title:  'snogogo',
    meta: [
      {
        charset: 'utf-8',
      },
      {
        name: 'viewport',
        content: 'width=device-width, initial-scale=1',
      },
    ],
    link: [
      {
        rel: 'icon',
        type: 'image/x-icon',
        href: '/bitbug_favicon.ico',
      }
    ],
    script: [
      {
        src: '/js/jquery-2.1.1.min.js',
        ssr: true,
      },
    ],
  },
    modules: [
        // Doc: https://axios.nuxtjs.org/usage
        '@nuxtjs/axios'
      ],
        // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
    plugins: [
      {
        src: '~/plugins/tools.js',
        ssr: false,
      },
        { src: '~/plugins/axios.js' }  ,
        {
          src: '~/plugins/route.js',
          ssr: false,
        },
        
        {
          src: '~/plugins/data.js',
          mode: 'server'
        },
    ],
    hooks:{
      'vue-renderer:ssr:context'(context){  
        // const routePath="snogogo_nuxt/web/index";
        // console.log("routePath:",routePath);
        // context.nuxt={serverRendered: true, routePath}
      }
    },
    axios: {
      baseURL: 'https://finance.bestsmartbee.com/',
      // baseURL: 'https://www.snogogo.com/',
      https: 'false',
    },
    buildModules: ['@nuxtjs/tailwindcss'],
    router: {
        // base: '/snogogo_nuxt/',
        middleware:"initialize_store",
        extendRoutes(routes, resolve) {
          routes.push({
              name: 'IndexPage',
              path: '/snogogo_nuxt',
              component: resolve(__dirname, 'pages/index.vue'),
             
          });
          routes.push({
            name: 'topicDetail',
            path: '/topic/:id/:name',
            component: resolve(__dirname, 'pages/topic-detail.vue'),
           
        });
        routes.push({
          name: 'login',
          path: '/login',
          component: resolve(__dirname, 'pages/index.vue'),
         
      });
        routes.push({
          name: 'skiResort',
          path: '/ski-resort/:region',
          component: resolve(__dirname, 'pages/ski-resort.vue'),
         });
        routes.push({
          name: 'skiResortDetail',
          path: '/ski-resort/:id/:name',
          component: resolve(__dirname, 'pages/ski-resort-detail.vue'),
         });
         routes.push({
          name: 'TagPage',
          path: '/tags/:tag',
          component: resolve(__dirname, 'pages/community.vue'),
         
         });

         routes.push({
          name: 'categoryPage',
          path: '/category/:id/:name',
          component: resolve(__dirname, 'pages/community.vue'),
         });

         routes.push({
          name: 'userCate',
          path: '/user/:id/cid/:cid',
          component: resolve(__dirname, 'pages/user/cate.vue'),
         });

         routes.push({
          name: 'followersPage',
          path: '/user/:id/:type',
          component: resolve(__dirname, 'pages/user/followers.vue'),
         });
         

         routes.push({
          name: 'userIndex',
          path: '/uid/:id',
          component: resolve(__dirname, 'pages/user/index.vue'),
         });
         
         routes.push({
          name: 'CommunityPage',
          path: '/community/:page',
          component: resolve(__dirname, 'pages/community.vue'),
         });

         routes.push({
          name: 'bookmarksPage',
          path: '/dashboard/:page',
          component: resolve(__dirname, 'pages/dashboard/my-likes.vue'),
         });

         
        }
      }
      
      
    
}